#ifndef IFFDECODE_H
#define IFFDECODE_H

#include <stdio.h>
#include <stdlib.h>
#include <QPixmap>


class IFFDecode {
	public:
		IFFDecode();
		bool Load( char * );
		unsigned char ReadByte();
		unsigned short ReadWord();
		unsigned int ReadLong();
		unsigned short GetWidth();
		unsigned short GetHeight();
		bool IsInterlaced();
		void PlanarToChunky();
		void ReadToArray( char *, int );
		void Poke( unsigned char );
		void ReadBMHD();
		QPixmap *pixmap;
		bool Error( const char * );
	private:
		const char *error;
		FILE *fp;
		char *chunky;
		char *cmap;
		char *FileBuffer;
		bool is_interlaced;
		int xpos;
		int ypos;
		int FilePointer;
		int FileSize;
};

#endif
